import Vue from 'vue'
import Vuex from 'vuex';
import App from './App.vue'
import router from './router'
// import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './assets/css/my_style.css'
import Axios from "@/config/axiosConfig";
// import './assets/css/global.css'

Vue.config.productionTip = false

Vue.use(ElementUI);

Vue.use(Vuex);

const store = new Vuex.Store({
  state: {
    isGray: false // 默认情况下页面不是灰色的
  },
  mutations: {
    toggleGray(state) {
      state.isGray = !state.isGray; // 切换灰色状态
    }
  }
});
Vue.prototype.$Axios = Axios
Vue.mixin({
    methods: {
        api(apiUrl, params) {
            return Axios({
                method: 'post',
                url: apiUrl,
                data: params
            })
        }
    }
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')




